package com.atguigu.gmall.product.client;

import com.atguigu.gmall.model.list.SearchAttr;
import com.atguigu.gmall.model.product.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author: 孙润达
 * @Date: 2022/1/8 13:00
 */
@FeignClient(name ="service-product")
public interface ProductFeignClient {
    @ApiOperation("通过三级分类id查询分类信息")
    @GetMapping("/api/product/inner/getCategoryView/{category3Id}")
    public BaseCategoryView getCategoryView(@PathVariable Long category3Id );

    @ApiOperation("获取sku最新价格")
    @GetMapping("/api/product/inner/getSkuPrice/{skuId}")
    public BigDecimal getSkuPrice(@PathVariable Long skuId );

    @ApiOperation(" 根据skuId获取sku信息,根据skuId 查询图片列表集合")
    @GetMapping("/api/product/inner/getSkuInfo/{skuId}")
    public SkuInfo getSkuInfo(@PathVariable Long skuId );

    @ApiOperation("根据spuId，查询spu_sale_attr_value（被选中的）")
    @GetMapping("/api/product/inner/getSpuSaleAttrValue/{skuId}/{spuId}")
    public List<SpuSaleAttr> getSpuSaleAttrListCheckBySku(@PathVariable Long skuId,@PathVariable Long spuId);

    @ApiOperation("根据spuId，skuId 查询销售属性集合")
    @GetMapping("/api/product/inner/getSkuValueIdsMap/{spuId}")
    public Map getSkuValueIdsMap(@PathVariable Long spuId);
    @GetMapping("/api/product/inner/getBaseCategoryViewList")
    public List<BaseCategoryView> getBaseCategoryViewList();
    //3.查询品牌
    @GetMapping("/api/product/inner/getBaseTrademark/{tmId}")
    public BaseTrademark getBaseTrademark(@PathVariable Long tmId);

    // 5.平台属性集合
    @GetMapping("/api/product/inner/getSkuAttrValue/{skuId}")
    public  List<SkuAttrValue> getSkuAttrValue(@PathVariable Long skuId);

}
